package cn.broadsense.thrid.param;

import cn.hutool.core.util.StrUtil;
import lombok.Getter;
import lombok.Setter;

/**
 * 算法能力启停
 *
 * @author pengxin
 * @date 2022-10-08 14:32
 */
@Getter
@Setter
public class AlgorithmStatusParam extends BaseParam {

    /**
     * 算法id
     */
    private String algorithmId;

    /**
     * 版本号
     */
    private String version;

    /**
     * 启用1，停用0
     */
    private Integer enable;

    @Override
    public void checkParam() {
        if (StrUtil.isBlank(algorithmId)) {
            throw new SecurityException("算法id不能为空");
        }
        if (null == enable) {
            throw new SecurityException("启用状态不能为空");
        }
    }

    @Override
    public Class getResultClass() {
        return String.class;
    }
}
